/**
 * 直接铺满
 */
const {ccclass, property} = cc._decorator;

@ccclass
export default class BgWinSize extends cc.Component {
 

    // use this for initialization
    onLoad() {
        this.reSize();
    }

    reSize(){ 
        var windowSize = cc.winSize; 
        this.node.width = windowSize.width;
        this.node.height = windowSize.height;
    }

    onEnable(){
        cc.view.on('resize', this.reSize,this);
    }
    
    onDisable(){
        cc.view.off('resize', this.reSize,this);
    }

    // update (dt) {}
}
